<%@ page session="false"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/my.tld" prefix="my"%>
<%@ taglib uri="/WEB-INF/tld/user.tld" prefix="user"%>
<%@ taglib uri="/WEB-INF/tld/activity.tld" prefix="activity"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:import url="/WEB-INF/tpl/_include/_css.jsp" />
<link rel="stylesheet" href="style/validationEngine.jquery.css" type="text/css">

<body>
<script>
       $(function () {
           jQuery("#pwdForm").validationEngine();
           $('#pwd_submit').bind('click', function () {                
               if ($('#pwdForm').validationEngine('validate')) {
               //$(this).attr('disabled', 'disabled');              
               $.ajax({
					   type:"post",
					   url:"./user.do?src=10201&do=User.passwordPostAjax",
					   data:$("#pwdForm").serialize(),
					   success: function(msg){
						    $.facebox(msg);
					   }					   
					});                 
               }
           });
           jQuery("#emailForm").validationEngine();
           $('#email_submit').bind('click', function () {                
               if ($('#emailForm').validationEngine('validate')) {
               $.ajax({
					   type:"post",
					   url:"./user.do?src=10201&do=User.protectPostAjax",
					   data:$("#emailForm").serialize(),
					   success: function(msg){
						    $.facebox(msg);
					   }					   
					});                 
               }
           });
           jQuery("#userForm").validationEngine();
           $('#user_submit').bind('click', function () {                
               if ($('#userForm').validationEngine('validate')) {
               $.ajax({
					   type:"post",
					   url:"./user.do?src=10201&do=User.basicPostAjax",
					   data:$("#userForm").serialize(),
					   success: function(msg){
						    $.facebox(msg);
					   }					   
					});                 
               }
           });
       });

   </script>
<div id="content" class="reg_bg">
	<!--header begin-->
     <c:import url="/WEB-INF/tpl/_include/_header2.jsp" />
	 <!--header end-->

    <!--main begin-->

    <div id="main">
    	<div class="reg_input">
        	<div class="reg_left">
            	<h3 class="space_title f16"><em>设置个人安全</em></h3>
                <h4 class="space_title f14"><a href="./user.do?src=10201&do=User.basic" class="pubic hov">个人安全</a><a href="./user.do?src=10201&do=Subscript.layout" class="pubic">关注信息</a></h4>
                <div class="per_box">
                <form id="userForm">
                <h3 class="reg_title f14">&gt;&nbsp;个人信息<span></span></h3>
                    <dl class="alter_dl">
                        <dt>性 别</dt>
                        <dd><input name="sex" type="radio" value="0" ${basic.sex eq 0?"checked = 'checked'":""}  /><label>男</label>
                        <input name="sex" type="radio" value="1" ${basic.sex eq 1?"checked = 'checked'":""} /><label>女</label></dd>
                    </dl>
                    <dl class="alter_inp">
                        <dt>昵称</dt>
                        <dd><input type="text" id="nickname" name="nickname" value="${my:txt(basic.nickname)}"  class="validate[required,maxSize[20]]" /></dd>
                    </dl>

                    <p class="save_btn" style="width:500px;"><input id="user_submit"  type="button" value="保　存" class="reg_btn" /></p>
                 </form>
                <form id="pwdForm">
                	<h3 class="reg_title f14">&gt;&nbsp;个人基本信息</h3>
                    <dl class="alter_inp">
                    	<dt>原始密码</dt>
                        <dd><input type="text" name="oldpassword" id="oldpassword" maxlength="20" /></dd>
                        <dd></dd>
                    </dl>

                    <dl class="alter_inp">
                        <dt>新密码</dt>
                        <dd><input type="text" class="psadd validate[required,minSize[6],maxSize[20]]" name="newpassword" id="newpassword" maxlength="20"  /></dd>
                        <dd></dd>
                    </dl>

                    <dl class="alter_inp">
                        <dt>确认密码</dt>
                        <dd><input type="text" name="confirm" id="confirm" maxlength="20" class="validate[required,minSize[6],maxSize[20],equals[newpassword]]" /></dd>
                        <dd></dd>
                    </dl>
                    <p class="save_btn" style="width:500px;"><input id="pwd_submit" type="button" value="保　存" class="reg_btn" /></p>
                </form>
                <form id="emailForm">                    
                    <h3 class="reg_title f14">&gt;&nbsp;密码找回邮箱<span>邮箱一旦设置将无法更改，请尽量选择常用邮箱</span></h3>                     
                    <dl class="alter_inp">
                        <dt>邮箱</dt>
                        <dd><input type="text" name="email" id="email" class="validate[required,email]" /></dd>
                    </dl>
                    <p class="save_btn" style="width:500px;"><input id="email_submit"   type="button" value="保　存" class="reg_btn" /></p>
                 </form> 
                </div>

            </div>

            <div class="reg_right">                 
                <div id="_login_content">
				   <c:import url="/WEB-INF/tpl/_include/_login.jsp" />
				</div>
            </div>
        </div>
    </div>
    <!--main end-->
    <!--footer begin-->
      <c:import url="/WEB-INF/tpl/tpl/_footer.jsp" />
    <!--footer end-->
  
</body>
</html>
